package org.balabala.user.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.util.Date;

import lombok.Data;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;

/**
 * 
 * 
 * @author hanshanxi
 * @email 3176988793@qq.com
 * @date 2021-09-04 09:31:52
 */
@Data
@TableName("user")
public class UserEntity implements Serializable {
	private static final long serialVersionUID = 1L;

	/**
	 * 
	 */

    @TableId(value = "id",type = IdType.INPUT)
	private Integer id;
	/**
	 * 用户账号
	 */
	private Long uid;
	/**
	 * 电话号码
	 */
    @NotNull(message = "电话号码不能为空")
	@Size(min = 11,max = 11,message = "请输入正确的十一位手机验证码")
	private String phoneNumber;
	/**
	 * 邮箱
	 */
	@Email(message = "请输入正确格式的邮箱")
	private String mailbox;
	/**
	 * 
	 */
	private Date registrationTime;
	/**
	 * 昵称
	 */
	@NotNull(message = "请输入昵称")
	private String userName;
	/**
	 * 会员
	 */
	private Integer isMember;
	/**
	 *
	 */
	private Integer state;
	/**
	 * 
	 */
	@NotNull
	@Size(min = 8,max = 16,message = "密码长度应在8到16位")
	private String password;

}
